<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>李薇薇的个人博客</title>
  <!-- 引入 Vue 2 -->
  <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
  <!-- 引入 Element UI 样式 -->
  <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
  <!-- 引入 Element UI 组件库 -->
  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  <style>
    ul {
      list-style-type: none;
      margin: 0 auto;
      padding: 0;
      display: flex;
      justify-content: center;
      overflow: hidden;
    }
    li {
      float: left;
    }
    a:link, a:visited {
      display: block;
      width: 140px;
      font-weight: bold;
      color: #FFFFFF;
      background-color: #bebebe;
      text-align: center;
      padding: 15px;
      text-decoration: none;
      text-transform: uppercase;
    }
    a:hover, a:active {
      background-color: #e6e6e6;
    }

    body {
      background-image: url("bei.jpg");
      background-size: cover;
      background-repeat: no-repeat;
      background-attachment: fixed;
      margin: 0;
      padding: 20px;
      display: flex;
      flex-direction: column;
      align-items: center;
      min-height: 100vh;
      justify-content: center;
            align-items: center;
    }

    h1, a {
      color: white;
      text-align: center;
      margin-bottom: 10px;
    }
    a {
      display: block;
      text-decoration: none;
    }
 
    li {
      list-style: none;
    }
 
    .box {
      position: relative;
      margin: 100px auto;
      width: 1000px;
      height: 500px;
      background-color: none;
      overflow: hidden;
    }
    
    /* Element UI Carousel 自定义样式 */
    .el-carousel {
      width: 100%;
      height: 100%;
    }
    .el-carousel__item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    
    /* 自定义指示器样式 */
    .custom-indicator {
      position: absolute;
      bottom: 30px;
      left: 50%;
      transform: translateX(-50%);
      margin: 0;
      padding: 0;
    }
    .custom-indicator li {
      display: inline-block;
      width: 8px;
      height: 8px;
      margin: 0 8px;
      border-radius: 50%;
      background-color: rgba(255, 255, 255, 0.7);
      cursor: pointer;
    }
    .custom-indicator li.active {
      background-color: red;
    }
  </style>
</head>
<body>
  <div id="app">
    <ul>
      <li><a href="jieshao.html" target="_blank">自我介绍</a ></li>
      <li><a href="xuexi.html" target="_blank">学习资料</a ></li>
      <li><a href="liuyan.html" target="_blank">欢迎留言</a ></li>
      <li><a href="xuexiang.html" target="_blank">网页评价</a ></li>
    </ul>

    <h1>这里是李薇薇的个人博客</h1><br />
    <h1>谢谢你愿意来了解我！</h1>

    <div class="box">
      <!-- 使用 Element UI 的 Carousel 组件 -->
      <el-carousel 
        :interval="1800" 
        indicator-position="none" 
        arrow="never"
        :autoplay="true"
        @change="handleCarouselChange">
        <el-carousel-item v-for="(item, index) in images" :key="index">
          <img :src="item.url" :alt="'图片' + (index + 1)">
        </el-carousel-item>
      </el-carousel>
      
      <!-- 自定义指示器 -->
      <ul class="custom-indicator">
        <li 
          v-for="(item, index) in images" 
          :key="index"
          :class="{active: currentIndex === index}"
          @click="handleIndicatorClick(index)">
        </li>
      </ul>
    </div>
  </div>

  <script>
    new Vue({
      el: '#app',
      data() {
        return {
          images: [
            {url: 'x5.jpg'},
            {url: 'x2.jpg'},
            {url: 'x3.jpg'},
            {url: 'x4.jpg'}
          ],
          currentIndex: 0
        }
      },
      methods: {
        handleCarouselChange(currentIndex) {
          this.currentIndex = currentIndex;
        },
        handleIndicatorClick(index) {
          this.currentIndex = index;
          // 如果需要手动切换后继续自动播放，可以在这里重新设置自动播放
        }
      }
    });
  </script>
</body>
</html>